//package ServletDemo01;
//
//
//
//import entity.Student;
//import util.GokJDBCUtil;
//
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//import java.util.List;
//
//
///**
// * Servlet implementation class StudentList
// */
//@WebServlet("/StudentList")
//public class StudentList extends HttpServlet {
//	private static final long serialVersionUID = 1L;
//
//    /**
//     * @see HttpServlet#HttpServlet()
//     */
//    public StudentList() {
//        super();
//        // TODO Auto-generated constructor stub
//    }
//
//	/**
//	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
//	 */
//	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//		//		模拟从数据库查询到n个学生
////		stus 有三个学生
////		List<Student> stus=new ArrayList<Student>();
////		stus.add(new Student(1,"  张三","python班级"));
////		stus.add(new Student(2,"李四","java班级"));
////		stus.add(new Student(3,"王五","c++班级"));
////		从数据库找n个学生信息
//	      // 重新查询最新的学生列表
//        List<Student> stu = GokJDBCUtil.queryAll("select * from student", Student.class);
//        request.setAttribute("stu", stu);
//        request.getRequestDispatcher("student.jsp").forward(request, response);
//
//	}
//
//	/**
//	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
//	 */
//	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//		// TODO Auto-generated method stub
//		doGet(request, response);
//	}
//
//}
